package top.anydata.lifeofcode.lifesystem.web.controller.admin.dashboard;

import io.swagger.v3.oas.annotations.security.SecurityRequirements;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能描述:
 *
 * @author <a href="mailto:caingao@anydata.top">CainGao</a>
 * @version V_1.0
 * @date 2023/10/8 5:44 PM
 */
@RestController
@RequestMapping("/sys/api/dashboard")
public class DashBoardController {

    @RequestMapping("/dau")
    @SecurityRequirements
    public ResponseEntity<String> dau(){
        return ResponseEntity.ok("123");
    }

    @RequestMapping("/index")
    @PreAuthorize("hasAuthority('sys:api:dashboard')")
    @SecurityRequirements
    public ResponseEntity<String> index(){
        return ResponseEntity.ok("123");
    }


}
